'use strict';

const Controller = require('egg').Controller;

class UserController extends Controller {
  async index() {
    const { ctx } = this
    var db = this.app.mongodb;
    var res = await db.collection("user").find().toArray();
    console.log(res);
    ctx.body = res
  }
}

module.exports = UserController;
